//
//  HomeTodayCollectionViewCell.m
//  share_business
//
//  Created by 吴于凌 on 2017/9/2.
//  Copyright © 2017年 wyl. All rights reserved.
//

#import "HomeTodayHeaderCell.h"
#import "BSCommon.h"
@implementation HomeTodayHeaderCell

- (id)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        self.backgroundColor = [UIColor whiteColor] ;
        [self setUpView];
    }
    return self;
}

-(void)setUpView {
    UIView *cell = [[UIView alloc]init];
    cell.backgroundColor = [UIColor whiteColor];
    cell.width = APPWIDTH;
    cell.height = self.height ;
    cell.x = 0 ;
    cell.y = 0 ;
    
    UIView *leftView = [[UIView alloc]initWithFrame:CGRectMake(APPWIDTH - 100, 0, 90, self.height)];

    UILabel *label = [BSWidget commonLableWithFrame:CGRectMake(0, 0, 60, 30) text:@"为您甄选" color:[UIColor orangeColor] font:14];
    [label sizeToFit];
    label.centerY = leftView.height / 2 ;
    [leftView addSubview:label];
    
    UIImageView *imageView = [BSWidget commonImageViewWithFrame:CGRectMake(label.maxX+5, 0, 16, 16) image:ImageNamed(@"home_today_left_img")];
    imageView.centerY = leftView.height / 2 ;
    [leftView addSubview:imageView];
    
    
    UIView *rightView = [[UIView alloc]initWithFrame:CGRectMake(20, 0, 90, self.height)];
    UIImageView *imageViewRight = [BSWidget commonImageViewWithFrame:CGRectMake(0, 0, 16, 16) image:ImageNamed(@"home_today_tejia")];
    imageViewRight.centerY = rightView.height / 2 ;
    [rightView addSubview:imageViewRight];
    
    UILabel *labelRight = [BSWidget commonLableWithFrame:CGRectMake(imageViewRight.maxX+5, 0, 60, 30) text:@"今日特价" color:[UIColor orangeColor] font:16];
    [labelRight sizeToFit];
    labelRight.centerY = rightView.height / 2 ;
    [rightView addSubview:labelRight];
    
    [cell addSubview:leftView];
    [cell addSubview:rightView];
    [self addSubview:cell];
    
}
@end
